#include "LanternGame.h"


LanternGame::LanternGame(void)
{
}


LanternGame::~LanternGame(void)
{
}

void LanternGame::draw()
{
	if(clientPlaying)
	{
		for (int i = 0; i < balls.size(); i++)
		{
			if (!balls.at(i)->drawBall())
			{
				balls.erase(balls.begin()+i);
			}
		}

		clouds->drawClouds(window);
	}
}

void LanternGame::mousePressed(sf::Vector2f loc)
{
	if (clientPlaying)
	{
		balls.push_back(std::make_shared<Ball>(window, world, character->getPosition(), b2Vec2(loc.x, loc.y)));
	}
}

void LanternGame::performLogic()
{
	if(clientPlaying)
	{
		monster->move();
	}
}
